package com.lty.practice.rabbitmq.customer.integration;

import com.lty.practice.rabbitmq.customer.model.Order;
import lombok.extern.slf4j.Slf4j;
import org.springframework.cloud.stream.annotation.StreamListener;
import org.springframework.stereotype.Component;

@Component
@Slf4j
public class OrderListener {
    @StreamListener(Waiter.FINISHED_ORDERS)
    public void listenFinishedOrders(Order order) {
        log.info("We've receive a finished order [{}].", order);
    }
}
